-- GENERATED SPELL FOR [Apprentice Mirveda] --


function spell0_15402(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20811,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15402', 3000, 1)
end

function spell1_15402(pUnit, Event) --@Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(12468,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15402', 11000, 1)
end

function Sorts_15402(pUnit, Event)
local choix_sorts_15402 = math.random(0, 1)
if choix_sorts_15402 == 0 then
pUnit:RegisterEvent('spell0_15402', 1, 1)
end
if choix_sorts_15402 == 1 then
pUnit:RegisterEvent('spell1_15402', 1, 1)
end
end

function mob15402_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15402', math.random(1500, 3000), 1)
end

function mob15402_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15402_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15402_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15402, 1, 'mob15402_Action')
RegisterUnitEvent(15402, 2, 'mob15402_Leave')
RegisterUnitEvent(15402, 3, 'mob15402_Kill')
RegisterUnitEvent(15402, 4, 'mob15402_Die')
